﻿<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
      <title>DoubleMapDictionary&lt;TK, TV&gt; 类
 | Fantasy.Net API Reference </title>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta name="title" content="DoubleMapDictionary&lt;TK, TV&gt; 类
 | Fantasy.Net API Reference ">
      
      <link rel="icon" href="../favicon.ico">
      <link rel="stylesheet" href="../public/docfx.min.css">
      <link rel="stylesheet" href="../public/main.css">
      <meta name="docfx:navrel" content="../toc.html">
      <meta name="docfx:tocrel" content="toc.html">
      
      <meta name="docfx:rel" content="../">
      
      
      
  </head>

  <script type="module">
    import options from './../public/main.js'
    import { init } from './../public/docfx.min.js'
    init(options)
  </script>

  <script>
    const theme = localStorage.getItem('theme') || 'auto'
    document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
  </script>

  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
    <header class="bg-body border-bottom">
      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
        <div class="container-xxl flex-nowrap">
          <a class="navbar-brand" href="../index.html">
            <img id="logo" class="svg" src="../logo.svg" alt="Fantasy.Net">
            Fantasy.Net
          </a>
          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
            <i class="bi bi-three-dots"></i>
          </button>
          <div class="collapse navbar-collapse" id="navpanel">
            <div id="navbar">
              <form class="search" role="search" id="search">
                <i class="bi bi-search"></i>
                <input class="form-control" id="search-query" type="search" disabled="" placeholder="搜索" autocomplete="off" aria-label="Search">
              </form>
            </div>
          </div>
        </div>
      </nav>
    </header>

    <main class="container-xxl">
      <div class="toc-offcanvas">
        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
          <div class="offcanvas-header">
            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
          </div>
          <div class="offcanvas-body">
            <nav class="toc" id="toc"></nav>
          </div>
        </div>
      </div>

      <div class="content">
        <div class="actionbar">
          <button class="btn btn-lg border-0 d-md-none" style="margin-top: -.65em; margin-left: -.8em" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
            <i class="bi bi-list"></i>
          </button>

          <nav id="breadcrumb"></nav>
        </div>

        <article data-uid="Fantasy.DataStructure.DoubleMapDictionary`2">



  <h1 id="Fantasy_DataStructure_DoubleMapDictionary_2" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2" class="text-break">
    DoubleMapDictionary&lt;TK, TV&gt; 类
  
  </h1>

  <div class="facts text-secondary">
    <dl><dt>命名空间</dt><dd><a class="xref" href="Fantasy.html">Fantasy</a>.<a class="xref" href="Fantasy.DataStructure.html">DataStructure</a></dd></dl>
  <dl><dt>程序集</dt><dd>Fantasy.Net.dll</dd></dl>
  </div>

  <div class="markdown summary"></div>
  <div class="markdown conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class DoubleMapDictionary&lt;TK, TV&gt; where TK : notnull where TV : notnull</code></pre>
  </div>



  <h4 class="section">类型参数</h4>
  <dl class="parameters">
    <dt><code>TK</code></dt>
    <dd></dd>
    <dt><code>TV</code></dt>
    <dd></dd>
  </dl>

  <dl class="typelist inheritance">
    <dt>继承</dt>
    <dd>
      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
      <div><span class="xref">DoubleMapDictionary&lt;TK, TV&gt;</span></div>
    </dd>
  </dl>


  <dl class="typelist derived">
    <dt>Derived</dt>
    <dd>
      <div><a class="xref" href="Fantasy.DataStructure.DoubleMapDictionaryPool-2.html">DoubleMapDictionaryPool&lt;TKey, TValue&gt;</a></div>
    </dd>
  </dl>

  <dl class="typelist derived">
    <dt>继承成员</dt>
    <dd>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
    </div>
  </dd></dl>

  <dl class="typelist extensionMethods">
    <dt>扩展方法</dt>
    <dd>
  <div>
      <a class="xref" href="Fantasy.Helper.JsonHelper.html#Fantasy_Helper_JsonHelper_ToJson__1___0_">JsonHelper.ToJson&lt;T&gt;(T)</a>
  </div>
  </dd></dl>





  <h2 class="section" id="constructors">构造函数
</h2>


  <a id="Fantasy_DataStructure_DoubleMapDictionary_2__ctor_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.#ctor*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2__ctor" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.#ctor">
  DoubleMapDictionary()
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public DoubleMapDictionary()</code></pre>
  </div>













  <a id="Fantasy_DataStructure_DoubleMapDictionary_2__ctor_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.#ctor*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2__ctor_System_Int32_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.#ctor(System.Int32)">
  DoubleMapDictionary(int)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public DoubleMapDictionary(int capacity)</code></pre>
  </div>

  <h4 class="section">参数</h4>
  <dl class="parameters">
    <dt><code>capacity</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
    <dd></dd>
  </dl>












  <h2 class="section" id="properties">属性
</h2>


  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_Keys_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.Keys*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_Keys" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.Keys">
  Keys
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public List&lt;TK&gt; Keys { get; }</code></pre>
  </div>





  <h4 class="section">属性值</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;TK&gt;</dt>
    <dd></dd>
  </dl>








  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_Values_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.Values*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_Values" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.Values">
  Values
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public List&lt;TV&gt; Values { get; }</code></pre>
  </div>





  <h4 class="section">属性值</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;TV&gt;</dt>
    <dd></dd>
  </dl>








  <h2 class="section" id="methods">方法
</h2>


  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_Add_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.Add*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_Add__0__1_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.Add(`0,`1)">
  Add(TK, TV)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void Add(TK key, TV value)</code></pre>
  </div>

  <h4 class="section">参数</h4>
  <dl class="parameters">
    <dt><code>key</code> <span class="xref">TK</span></dt>
    <dd></dd>
    <dt><code>value</code> <span class="xref">TV</span></dt>
    <dd></dd>
  </dl>












  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_Clear_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.Clear*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_Clear" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.Clear">
  Clear()
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void Clear()</code></pre>
  </div>













  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_Contains_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.Contains*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_Contains__0__1_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.Contains(`0,`1)">
  Contains(TK, TV)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool Contains(TK key, TV value)</code></pre>
  </div>

  <h4 class="section">参数</h4>
  <dl class="parameters">
    <dt><code>key</code> <span class="xref">TK</span></dt>
    <dd></dd>
    <dt><code>value</code> <span class="xref">TV</span></dt>
    <dd></dd>
  </dl>

  <h4 class="section">返回</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
    <dd></dd>
  </dl>











  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_ContainsKey_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.ContainsKey*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_ContainsKey__0_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.ContainsKey(`0)">
  ContainsKey(TK)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool ContainsKey(TK key)</code></pre>
  </div>

  <h4 class="section">参数</h4>
  <dl class="parameters">
    <dt><code>key</code> <span class="xref">TK</span></dt>
    <dd></dd>
  </dl>

  <h4 class="section">返回</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
    <dd></dd>
  </dl>











  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_ContainsValue_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.ContainsValue*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_ContainsValue__1_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.ContainsValue(`1)">
  ContainsValue(TV)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool ContainsValue(TV value)</code></pre>
  </div>

  <h4 class="section">参数</h4>
  <dl class="parameters">
    <dt><code>value</code> <span class="xref">TV</span></dt>
    <dd></dd>
  </dl>

  <h4 class="section">返回</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
    <dd></dd>
  </dl>











  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_ForEach_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.ForEach*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_ForEach_System_Action__0__1__" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.ForEach(System.Action{`0,`1})">
  ForEach(Action&lt;TK, TV&gt;)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void ForEach(Action&lt;TK, TV&gt; action)</code></pre>
  </div>

  <h4 class="section">参数</h4>
  <dl class="parameters">
    <dt><code>action</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-2">Action</a>&lt;TK, TV&gt;</dt>
    <dd></dd>
  </dl>












  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_GetKeyByValue_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.GetKeyByValue*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_GetKeyByValue__1_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.GetKeyByValue(`1)">
  GetKeyByValue(TV)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public TK GetKeyByValue(TV value)</code></pre>
  </div>

  <h4 class="section">参数</h4>
  <dl class="parameters">
    <dt><code>value</code> <span class="xref">TV</span></dt>
    <dd></dd>
  </dl>

  <h4 class="section">返回</h4>
  <dl class="parameters">
    <dt><span class="xref">TK</span></dt>
    <dd></dd>
  </dl>











  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_GetValueByKey_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.GetValueByKey*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_GetValueByKey__0_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.GetValueByKey(`0)">
  GetValueByKey(TK)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public TV GetValueByKey(TK key)</code></pre>
  </div>

  <h4 class="section">参数</h4>
  <dl class="parameters">
    <dt><code>key</code> <span class="xref">TK</span></dt>
    <dd></dd>
  </dl>

  <h4 class="section">返回</h4>
  <dl class="parameters">
    <dt><span class="xref">TV</span></dt>
    <dd></dd>
  </dl>











  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_RemoveByKey_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.RemoveByKey*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_RemoveByKey__0_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.RemoveByKey(`0)">
  RemoveByKey(TK)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void RemoveByKey(TK key)</code></pre>
  </div>

  <h4 class="section">参数</h4>
  <dl class="parameters">
    <dt><code>key</code> <span class="xref">TK</span></dt>
    <dd></dd>
  </dl>












  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_RemoveByValue_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.RemoveByValue*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_RemoveByValue__1_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.RemoveByValue(`1)">
  RemoveByValue(TV)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void RemoveByValue(TV value)</code></pre>
  </div>

  <h4 class="section">参数</h4>
  <dl class="parameters">
    <dt><code>value</code> <span class="xref">TV</span></dt>
    <dd></dd>
  </dl>












  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_TryGetKeyByValue_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.TryGetKeyByValue*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_TryGetKeyByValue__1__0__" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.TryGetKeyByValue(`1,`0@)">
  TryGetKeyByValue(TV, out TK)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool TryGetKeyByValue(TV value, out TK key)</code></pre>
  </div>

  <h4 class="section">参数</h4>
  <dl class="parameters">
    <dt><code>value</code> <span class="xref">TV</span></dt>
    <dd></dd>
    <dt><code>key</code> <span class="xref">TK</span></dt>
    <dd></dd>
  </dl>

  <h4 class="section">返回</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
    <dd></dd>
  </dl>











  <a id="Fantasy_DataStructure_DoubleMapDictionary_2_TryGetValueByKey_" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.TryGetValueByKey*"></a>

  <h3 id="Fantasy_DataStructure_DoubleMapDictionary_2_TryGetValueByKey__0__1__" data-uid="Fantasy.DataStructure.DoubleMapDictionary`2.TryGetValueByKey(`0,`1@)">
  TryGetValueByKey(TK, out TV)
  
  </h3>

  <div class="markdown level1 summary"></div>
  <div class="markdown level1 conceptual"></div>

  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool TryGetValueByKey(TK key, out TV value)</code></pre>
  </div>

  <h4 class="section">参数</h4>
  <dl class="parameters">
    <dt><code>key</code> <span class="xref">TK</span></dt>
    <dd></dd>
    <dt><code>value</code> <span class="xref">TV</span></dt>
    <dd></dd>
  </dl>

  <h4 class="section">返回</h4>
  <dl class="parameters">
    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
    <dd></dd>
  </dl>












</article>


        
      </div>

      <div class="affix">
        <nav id="affix"></nav>
      </div>
    </main>

    <div class="container-xxl search-results" id="search-results"></div>

    <footer class="border-top">
      <div class="container-xxl">
        <div class="flex-fill">
          <span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
        </div>
      </div>
    </footer>
  </body>
</html>